# Contributor: Bart Ribbers <bribbers@disroot.org>
# Maintainer: Bart Ribbers <bribbers@disroot.org>
pkgname=py3-pyowm
pkgver=3.0.0
pkgrel=0
pkgdesc="A Python wrapper around OpenWeatherMap web APIs"
url="https://github.com/csparpa/pyowm"
arch="noarch"
license="MIT"
depends="python3 py3-requests py3-geojson"
makedepends="py3-setuptools"
checkdepends="py3-pytest"
source="https://github.com/csparpa/pyowm/archive/$pkgver/pyowm-$pkgver.tar.gz"
# Tests require valid API key
# net required for tests
options="!check"
builddir="$srcdir/pyowm-$pkgver"

build() {
	python3 setup.py build
}

check() {
	pytest
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="ec6285644fd568ffbcdd01601a4d5a87e5bfb3d3d3e9da5e7d52800443a29c096118c1fee9ca0482f226d6c0ae097ac3ae953430f34ac2ecf09a765f34c138fa  pyowm-3.0.0.tar.gz"
